import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        redirect: '/home',
    },
    {
        path: '/home',
        name: 'Home',
        component: () =>
            import ( /* webpackChunkName: "about" */ '../views/Home/Home.vue')
    },
    {
        path: '/goods',
        name: 'Goods',
        component: () =>
            import ( /* webpackChunkName: "goods" */ '../views/Goods/Goods.vue')
    },
    {
        path: '/order',
        name: 'Order',
        component: () =>
            import ( /* webpackChunkName: "order" */ '../views/Order/Order.vue')
    },
    {
        path: '/free',
        name: 'Free',
        component: () =>
            import ( /* webpackChunkName: "free" */ '../views/Free/Free.vue')
    },
    {
        path: '/user',
        name: 'User',
        component: () =>
            import ( /* webpackChunkName: "user" */ '../views/User/User.vue')
    }
    // {
    //   path: '/about',
    //   name: 'About',
    //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
    // }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router